﻿    /***************************************************************************************************
    **  Table:	    public.feature
    **  Author:		Zhixian Ong
    **
    **  Description:
    **    
    **    Represents a registered feature.
    **    
    **    Use the following queries to find available controllers and applicable privileges.
    **    SELECT * FROM public.controller;
    **    SELECT * FROM public.privilege;
    **    
    **
    **  Modification History:
    **
    **      20140102  Zhixian Ong     - Initial data
    ** 
    **  Status:
    **      Dev
    ** 
    ***************************************************************************************************/

	----------------------------------------------------------------------------
	-- Insert

    INSERT INTO public.feature (name, privilege_id, controller_id) VALUES ('List Project',      1, 1);
    INSERT INTO public.feature (name, privilege_id, controller_id) VALUES ('View Project',      2, 1);
    INSERT INTO public.feature (name, privilege_id, controller_id) VALUES ('Add Project',       3, 1);
    INSERT INTO public.feature (name, privilege_id, controller_id) VALUES ('Update Project',    4, 1);
    INSERT INTO public.feature (name, privilege_id, controller_id) VALUES ('Remove Project',    5, 1);

    INSERT INTO public.feature (name, privilege_id, controller_id) VALUES ('List Environment',      1, 1);
    INSERT INTO public.feature (name, privilege_id, controller_id) VALUES ('View Environment',      2, 2);
    INSERT INTO public.feature (name, privilege_id, controller_id) VALUES ('Add Environment',       3, 3);
    INSERT INTO public.feature (name, privilege_id, controller_id) VALUES ('Update Environment',    4, 4);
    INSERT INTO public.feature (name, privilege_id, controller_id) VALUES ('Remove Environment',    5, 5);


    INSERT INTO public.feature (name, privilege_id, controller_id) VALUES ('List Resource',     1, 1);
    INSERT INTO public.feature (name, privilege_id, controller_id) VALUES ('View Resource',     2, 2);
    INSERT INTO public.feature (name, privilege_id, controller_id) VALUES ('Add Resource',      3, 3);
    INSERT INTO public.feature (name, privilege_id, controller_id) VALUES ('Update Resource',   4, 4);
    INSERT INTO public.feature (name, privilege_id, controller_id) VALUES ('Remove Resource',   5, 5);


	----------------------------------------------------------------------------
	-- Select

    SELECT * FROM public.feature;
    
    